#include <iostream>
#include <stdio.h>
using namespace std;
struct node
{
  char s;
  struct node *next;
};

void print(struct node *head)
{
  struct node *p = head;
  while (p != NULL)
  {
    cout << p->s << endl;
    p = p->next;
  }
}
int main()
{
  char s[100];
  gets(s);
  int i, j, n, min;
  char t;
  for (n = 0; s[n] != '\0'; n++)
    ;
  for (i = 0; i < n - 1; i++)
  {
    min = i;
    for (j = i + 1; j < n; j++)
    {
      if (s[min] > s[j])
        min = j;
    }
    t = s[i];
    s[i] = s[min];
    s[min] = t;
  }
  struct node *head, *q;
  head = new node;
  struct node *p = head;
  head->s = s[0];
  for (i = 1; i < n; i++)
  {
    q = new node;
    q->s = s[i];
    p->next = q;
    p = p->next;
  }
  p->next = NULL;
  print(head);
  system("pause");
  return 0;
}